﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PhanQuyenUser.ascx.cs" Inherits="WebUserControl_PhanQuyenUser" %>
<%@ Register src="uscTitleForm.ascx" tagname="uscTitleForm" tagprefix="uc2" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>


  <script src='<%=ResolveUrl("~/JScript/jquery-ui.min.js")%>' type="text/javascript"></script>
  <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  <link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />

<script type="text/javascript">
     function pageLoad() {
     
      $("#accordion").accordion({ fillSpace: true,animated: 'bounceslide'});
     
     
        $("#<%= btnSave.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
      $("#<%= btnDelete.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <fieldset>
    <legend>Phân Quyền Người Dùng</legend>
    
         <asp:Panel ID="Panel1" runat="server" BackColor="#EBEBEB" 
                        BorderStyle="None" Height="33px" Width="100%">
                    <asp:ImageButton ID="btnSave" runat="server" Width="25px" Height="25px" ToolTip="Lưu"
                        ImageUrl="~/WebMaster/Images/Save.png" onclick="btnSave_Click" /> 
                     &nbsp; 
                    <asp:ImageButton ID="btnDelete" runat="server" Width="25px" Height="25px" ToolTip="Xóa"
                        ImageUrl="~/WebMaster/Images/Symbol-Delete.png" Visible="false" onclick="btnDelete_Click" /> 
         </asp:Panel>                            
             <div class="fm-req">
                       <label for="DropDownListUser">Chọn User:</label>
                    
                    <asp:DropDownList ID="DropDownListUser" runat="server" Width="250px" 
                        AutoPostBack="true" 
                        onselectedindexchanged="DropDownListUser_SelectedIndexChanged">
                    </asp:DropDownList>
                    </div>
        </fieldset>
               
             <div id="accordion">
	                       <h3><a href="#">Quản trị hệ thống</a></h3>
	                            <div> 
                                    <p>
                                        <asp:GridView ID="gvQuanTriHeThong" runat="server" AutoGenerateColumns="False" 
                                            Width="100%" ShowFooter="True">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Chọn" ShowHeader="False">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="checkPage"  runat="server" Checked='<%# Eval("Checked") %>' />
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:CheckBox ID="checkPage" runat="server" Checked='<%# Eval("Checked") %>'/>
                                                    </EditItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="checkAll" runat="server" AutoPostBack="true" 
                                                            oncheckedchanged="checkAllQTHT_CheckedChanged" Text="Chọn hết" />
                                                    </FooterTemplate>
                                                    <FooterStyle HorizontalAlign="Left" Width="100px" BackColor="#DBDBDB" />
                                                    <HeaderStyle Height="24px" Width="100px" />
                                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                                </asp:TemplateField>
                                                <asp:BoundField HeaderText="Trang" DataField="PageName" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="PageID" HeaderText="PageID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="MenuID" HeaderText="MenuID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                   </p>
                                </div>
                                
                           <h3><a href="#">Xuất nhập hàng</a></h3>
	                            <div>
                                   <p>
                                        <asp:GridView ID="gvXuatNhapHang" runat="server" AutoGenerateColumns="False" 
                                            Width="100%" ShowFooter="True">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Chọn" ShowHeader="False">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="checkPage"  runat="server" Checked='<%# Eval("Checked") %>' />
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:CheckBox ID="checkPage" runat="server" Checked='<%# Eval("Checked") %>' />
                                                    </EditItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="checkAll" runat="server" AutoPostBack="true" 
                                                            oncheckedchanged="checkAllXNHang_CheckedChanged" Text="Chọn hết" />
                                                    </FooterTemplate>
                                                    <FooterStyle HorizontalAlign="Left" Width="100px" BackColor="#DBDBDB" />
                                                    <HeaderStyle Height="24px" Width="100px" />
                                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                                </asp:TemplateField>
                                                <asp:BoundField HeaderText="Trang" DataField="PageName" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="PageID" HeaderText="PageID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="MenuID" HeaderText="MenuID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                   </p>
                                </div>
                                
                           <h3><a href="#">Dữ liệu nền</a></h3>
	                            <div>
                                    <p>
                                        <asp:GridView ID="gvDuLieuNen" runat="server" AutoGenerateColumns="False" 
                                            Width="100%" ShowFooter="True">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Chọn" ShowHeader="False">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="checkPage"  runat="server" Checked='<%# Eval("Checked") %>' />
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:CheckBox ID="checkPage" runat="server" Checked='<%# Eval("Checked") %>' />
                                                    </EditItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="checkAll" runat="server" AutoPostBack="true"
                                                            oncheckedchanged="checkAllDLNen_CheckedChanged" Text="Chọn hết" />
                                                    </FooterTemplate>
                                                    <FooterStyle HorizontalAlign="Left" Width="100px" BackColor="#DBDBDB" />
                                                    <HeaderStyle Height="24px" Width="100px" />
                                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                                </asp:TemplateField>
                                                <asp:BoundField HeaderText="Trang" DataField="PageName" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="PageID" HeaderText="PageID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="MenuID" HeaderText="MenuID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                    </p>
                               </div>
                               
                            <h3><a href="#">Báo cáo</a></h3>
	                            <div>
                                    <p>
                                    <asp:GridView ID="gvBaoCao" runat="server" AutoGenerateColumns="False" 
                                        Width="100%" ShowFooter="True">
                                        <Columns>
                                            <asp:TemplateField HeaderText="Chọn" ShowHeader="False">
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="checkPage"  runat="server" Checked='<%# Eval("Checked") %>'/>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:CheckBox ID="checkPage" runat="server" Checked='<%# Eval("Checked") %>' />
                                                </EditItemTemplate>
                                                <FooterTemplate>
                                                    <asp:CheckBox ID="checkAll" runat="server" AutoPostBack="true"
                                                        oncheckedchanged="checkAllBaCao_CheckedChanged" Text="Chọn hết" />
                                                </FooterTemplate>
                                                <FooterStyle HorizontalAlign="Left" Width="100px" BackColor="#DBDBDB" />
                                                <HeaderStyle Height="24px" Width="100px" />
                                                <ItemStyle HorizontalAlign="Left" Width="100px" />
                                            </asp:TemplateField>
                                            <asp:BoundField HeaderText="Trang" DataField="PageName" >
                                                <FooterStyle BackColor="#DBDBDB" />
                                                <HeaderStyle HorizontalAlign="Left" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="PageID" HeaderText="PageID" Visible="False" >
                                                <FooterStyle BackColor="#DBDBDB" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="MenuID" HeaderText="MenuID" Visible="False" >
                                                <FooterStyle BackColor="#DBDBDB" />
                                            </asp:BoundField>
                                        </Columns>
                                    </asp:GridView>
                                </p>
                                </div>
                            <h3><a href="#">In chứng từ</a></h3>
	                            <div>
                                   <p>
                                        <asp:GridView ID="gvInChungTu" runat="server" AutoGenerateColumns="False" 
                                            Width="100%" ShowFooter="True">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Chọn" ShowHeader="False">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="checkPage"  runat="server" Checked='<%# Eval("Checked") %>'/>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:CheckBox ID="checkPage" runat="server" Checked='<%# Eval("Checked") %>' />
                                                    </EditItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="checkAll" runat="server" AutoPostBack="true"
                                                            oncheckedchanged="checkAllInCT_CheckedChanged" Text="Chọn hết" />
                                                    </FooterTemplate>
                                                    <FooterStyle HorizontalAlign="Left" Width="100px" BackColor="#DBDBDB" />
                                                    <HeaderStyle Height="24px" Width="100px" />
                                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                                </asp:TemplateField>
                                                <asp:BoundField HeaderText="Trang" DataField="PageName" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="PageID" HeaderText="PageID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="MenuID" HeaderText="MenuID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                    </p>
                               </div>
                           <h3><a href="#">Chốt nghiệp vụ</a></h3>
	                            <div>
                                  <p>
                                        <asp:GridView ID="gvChotNghiepVu" runat="server" AutoGenerateColumns="False" 
                                            Width="100%" ShowFooter="True">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Chọn" ShowHeader="False">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="checkPage"  runat="server" Checked='<%# Eval("Checked") %>'/>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:CheckBox ID="checkPage" runat="server" Checked='<%# Eval("Checked") %>' />
                                                    </EditItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="checkAll" runat="server" AutoPostBack="true"
                                                            oncheckedchanged="checkAllChotNV_CheckedChanged" Text="Chọn hết" />
                                                    </FooterTemplate>
                                                    <FooterStyle HorizontalAlign="Left" Width="100px" BackColor="#DBDBDB" />
                                                    <HeaderStyle Height="24px" Width="100px" />
                                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                                </asp:TemplateField>
                                                <asp:BoundField HeaderText="Trang" DataField="PageName" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="PageID" HeaderText="PageID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="MenuID" HeaderText="MenuID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                    </p>
                                </div>
                           <h3><a href="#">Liệt kê dữ liệu</a></h3>
	                            <div>
                                 <p>
                                        <asp:GridView ID="gvLietKeDuLieu" runat="server" AutoGenerateColumns="False" 
                                            Width="100%" ShowFooter="True">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Chọn" ShowHeader="False">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="checkPage"  runat="server" Checked='<%# Eval("Checked") %>'/>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:CheckBox ID="checkPage" runat="server" Checked='<%# Eval("Checked") %>' />
                                                    </EditItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="checkAll" runat="server" AutoPostBack="true"
                                                            oncheckedchanged="checkAllLietKDL_CheckedChanged" Text="Chọn hết" />
                                                    </FooterTemplate>
                                                    <FooterStyle HorizontalAlign="Left" Width="100px" BackColor="#DBDBDB" />
                                                    <HeaderStyle Height="24px" Width="100px" />
                                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                                </asp:TemplateField>
                                                <asp:BoundField HeaderText="Trang" DataField="PageName" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="PageID" HeaderText="PageID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="MenuID" HeaderText="MenuID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                   </p>
                               </div>
                               
                            <h3><a href="#">Tiện ích</a></h3>
	                            <div>
                                    <p>
                                        <asp:GridView ID="gvTienIch" runat="server" AutoGenerateColumns="False" 
                                            Width="100%" ShowFooter="True">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Chọn" ShowHeader="False">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="checkPage"  runat="server" Checked='<%# Eval("Checked") %>'/>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <asp:CheckBox ID="checkPage" runat="server" Checked='<%# Eval("Checked") %>' />
                                                    </EditItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="checkAll" runat="server" AutoPostBack="true"
                                                            oncheckedchanged="checkAllTienIch_CheckedChanged" Text="Chọn hết" />
                                                    </FooterTemplate>
                                                    <FooterStyle HorizontalAlign="Left" Width="100px" BackColor="#DBDBDB" />
                                                    <HeaderStyle Height="24px" Width="100px" />
                                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                                </asp:TemplateField>
                                                <asp:BoundField HeaderText="Trang" DataField="PageName" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="PageID" HeaderText="PageID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="MenuID" HeaderText="MenuID" Visible="False" >
                                                    <FooterStyle BackColor="#DBDBDB" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                   </p>                          
                          </div>
             </div>
        <uc1:uscMsgBox ID="uscMsgBox1" runat="server" />
    </ContentTemplate>
</asp:UpdatePanel>
